import { RequestMethod } from '../BaseRequest';
import request from '../Request';

const userApi = {


    //用户登录
    loginApi(data?: any) {
        return request({
            url: '/user/login',
            method: RequestMethod.POST,
            data,
        });
    },

    // 新增用户
    addUserApi(data?: any) {
        return request({
            url: '/user/add-user',
            method: RequestMethod.POST,
            data,
        });
    },

    //获取用户列表
    getRoleCodeList(params?: any) {
        return request({
            url: '/user/user-list',
            method: RequestMethod.GET,
            params,
        });
    },


    // 更新用户
    updateUserApi(data?: any) {
        return request({
            url: '/user/update-user',
            method: RequestMethod.POST,
            data,
        });
    },

    // 删除用户
    deleteUserApi(data?: any) {
        return request({
            url: '/user/delete-user',
            method: RequestMethod.POST,
            data,
        });
    },
    
    
};

export default userApi;
